Adjusting margins in book page images

ABSTRACT

A user interface (e.g., a browser window) includes a display area for displaying an image (e.g., a book page image). The image can be rescaled based on the dimensions of the display area and other factors. In some implementations, margins in book page images are adjusted to create additional or less display area.

TECHNICAL FIELD

The subject matter of this application is generally related to formatting content for presentation on a display area.

BACKGROUND

Information technology has provided new ways of publishing books, newspapers, magazines and periodicals. Electronic books (“e-books”) can be purchased and downloaded from e-bookstores online and read on various devices, such as personal computers, personal digital assistants (PDAs), pocket-PCs, mobile phones, media player/recorders, dedicated e-book readers, etc. An e-book is typically a collection of digital objects or documents, which are packaged and formatted with the intention of being displayed on a device or read by a speech generating application. E-books can be distributed over a network as a sequence of images, for example, one image for each page. E-books that are distributed over a network (e.g., the Internet, wireless network) using Hypertext Mark-up Language (HTML) can be read using a standard browser (e.g., Microsoft® Internet Explorer).

Conventional e-book technology suffers several drawbacks. For example, exploring an e-book typically requires horizontal motion (flipping through pages) and vertical motion (scrolling within every page), which makes regular sequential reading of book pages frustrating. Another drawback is the poor use of free space on large display screens and limited space on small display screens.

SUMMARY

A user interface (e.g., a browser window) includes a display area for displaying an image (e.g., a book page image). The image can be rescaled based on the dimensions of the display area and other factors.

In some implementations, a method includes: receiving an image having a content space including content and at least one margin proximate to the content; determining the margin size; adjusting the margin size to modify the content space; and rescaling the image content to substantially fill the content space.

Other implementations are disclosed, including implementations directed to systems, methods, apparatuses, computer-readable mediums and user interfaces.

DESCRIPTION OF DRAWINGS

FIG. 1 illustrates an exemplary viewport for displaying images.

FIG. 2 is a flow diagram for an exemplary scaling process for the viewport of FIG. 1.

FIG. 3 is a flow diagram for an exemplary margin adjustment process.

FIG. 4 is a flow diagram for an exemplary table of contents creation process.

FIG. 5 is a block diagram of an exemplary viewport system architecture.

FIG. 6 is a screen shot illustrating an exemplary table of contents including links.

FIG. 7 is a screen shot illustrating an exemplary book reference page.

DETAILED DESCRIPTION Viewport Overview

FIG. 1 illustrates an exemplary viewport 102 for displaying an image 104. In some implementations, the viewport 102 is displayed in a user interface 100 (e.g., a browser window). In the example shown, the viewport 102 is used to view book page images in an e-book application. The viewport 102, however, can be used to view other types of content (e.g., news articles, magazines, newspapers, .pdfs, blogs).

The viewport 102 can be provided by a server (e.g., a web server) over a network (e.g., the Internet, wireless network). In the example shown, the viewport 102 can be presented on a web page interface for a book search engine. A user can enter a search term (e.g., the title of a book) in a search box 112, and click a button 114 to begin or otherwise activate the search process. An example of a book search engine is Google™ Book Search, developed by Google Inc. (Mountain View, Calif.).

The search results can be presented to the user with other information (e.g., a summary, image) and a link to allow the user to view one or more pages of the book. For example, when the user clicks the link corresponding to a book the user wants to review, a book page image 104 can be presented in a display area 108 of the viewport 102. The book page image 104 typically includes book page content 106 (e.g., text, images), which can be set-off by margins. In some implementations, the book page image is a digital image of an actual book page. In some implementations, a single page layout or a two page layout (pages displayed side by side) can be displayed in the display area 108 of the viewport 102.

In addition to the viewport 102, a panel 110 can be displayed (e.g., side panel as shown) for presenting information related to the book. Such information can include, but is not limited to: title, author, summary or forward, title page link, copyright link, table of contents (TOC) link, index link, links to book retailers, library search link, a book search engine for searching for particular terms inside the book, etc. For example, if the user clicks the TOC link, then an image of the book's TOC will be displayed in the viewport 102, as shown in FIG. 6.

The user can navigate (e.g., flip) through book pages using the controls 116 (e.g., arrow buttons). By clicking the controls 116, the book page images can be displayed in two directions. The controls 116 can change according to the image that is displayed in the viewport 102. In some implementations where an entire book is viewable, the user can enter a page number into a search box and go directly to that page without incrementing through other pages. An example of a search box is the search box 608 shown in FIG. 6. In other implementations where only a few consecutive pages can be navigated (e.g., first few pages of a chapter), the controls 116 can be provided. Other controls for navigating a book can be included, such as scroll bars, buttons, links, speech command recognition, multi-touch displays, etc.

In some implementations, the viewport 102 (and the book page image contained therein) rescales with the user interface 100. For example, the user interface 100 may be manually resized for display using an input device (e.g., a mouse), or the viewport 102 may be automatically resized for display by an application or operating system of a device that may have a limited screen space (e.g., a portable computer, mobile phone, media player/recorder, PDA). To create a more comfortable user experience for extended reading, it is desirable to manage the screen space for displaying the book pages. This can be accomplished by filling the viewport 102 with a book page image 104 that has been rescaled to a size determined by the available display area 108 in the viewport 102 (i.e., the viewport dimensions) and other factors, which are described in reference to FIG. 2.

Scaling Process

FIG. 2 is a flow diagram for an exemplary scaling process 200. In some implementations, the process 200 begins when a viewport is launched in a user interface (e.g., a browser window) in response to a trigger event. The dimensions of the viewport can be determined from default values or based on the current size of the user interface (202). For example, if a user clicks a link corresponding to a result of a book search, the viewport can be launched based on default settings, and a default image can be displayed in the viewport (e.g., a title page or first page of a book). In some implementations, books are previously scanned and processed to extract and/or determine information (e.g., dimensions) that can be used to later manage the display of images in a viewport. Such processing can include, but is not limited to: determining a typical text bounding box for the book page images, determining a text bounding box for each book page image, removing artifacts in book page images (e.g., artifacts due to systematic scanning error), etc.

If the user clicks a control to select a different book page, the selected book page image can be retrieved from an image repository (204) or other suitable data structure for storing images (e.g., cache memory). In some implementations, the image is scaled to fit in the viewport given the current dimensions of the viewport and other factors (206). In other implementations, the user is provided with zoom controls with predetermined zoom “stops”. The zoom stops can be set as a function of viewport size (e.g., height, width). The zoom stops fit the image to the height and/or width of the viewport. The zoom stops can have absolute bounds to prevent the image from being made arbitrarily large or small.

The scaled image is displayed in the viewport (208). If the user interface (e.g., browser window) is resized (210), then the viewport can be re-sized based on the current dimensions of the user interface (212) and the process 200 returns to step 206. Alternatively, the viewport can be maintained based on user settings or preferences. For example, a user may want the size of the viewport to remain fixed when the user interface is resized.

In some implementations, the dimensions of the viewport 102 are provided by a window manager service, which is commonly included as part of an operating system (e.g., Windows XP). Other factors that can be used to scale an image for display in the viewport can include, but are not limited to:

-   -   the x-height (approximately the line height in pixels) of text         on the book page, which can be provided by an optical character         recognition (OCR) system, such as the Tesseract OCR engine         developed by Hewlett-Packard, Inc.;     -   a bounding box for text on the book page image, as given by         margin recognition or the user's current browser text size; and     -   the user's current browser text size. For example, text can be         rendered to a hidden portion of the user interface (e.g., a         browser window) and measured to estimate the user's browser text         size, and a scale factor can be determined from the measurement         for correcting the image size.

In some implementations, scaling can be determined empirically using some principles (e.g., rules, guidelines, options, etc.). Some exemplary principles for determining a scaled size include, but are not limited to:

-   -   Rule 1: At the scaled size there should not be horizontal         scrolling within the viewport.     -   Rule 2: At the scaled size, the height “x” should not be below a         threshold value of N (e.g., 10 or 12 pixels).     -   Guideline 1: If the text on the book page image is “close” to         fitting in the viewport (vertically), the scaled size image         should fit entirely in the viewport. In some implementations,         the scaling can be performed by a user with “zoom” controls         having zoom “stops” that are customized to the particular image         being zoomed.     -   Guideline 2: In general, minimize the number of times the         viewport is filled to consume a book page image. This         minimization can be achieved in part through margin cropping, as         described in reference to FIG. 3.

In some implementations, a bounding box of the text on the page can be padded. If the padded bounding box is “close” to fitting in the display area 108 of the viewport 102, then the image is scaled to fit the display area 108. In some implementations, the scaling is performed provided the text does not drop below a minimum x-height. In some implementations, the bounding box is “close” to fitting in the viewport if a certain portion (e.g., a percentage) of the bounding box fits within the viewport. Otherwise, more than one “viewportful” of vertical space may be needed to display the page.

Although any given book page image can have a fixed aspect ratio, the viewport 102 containing the book page image does not have to have a fixed aspect ratio. The image could be long and narrow if the whole page is being displayed or short and wide if the top half of the page is displayed. Thus, there can be at least two options:

-   -   Option 1: Minimize the number of “viewportfuls” needed to show a         single book page image, at the expense of text size (e.g., place         as much text into the viewport as possible by scaling down the         text until the text reaches nearly the minimum line height).     -   Option 2: Scale the image up to get larger text, at the cost of         needing more “viewportfuls” to consume a single book page. The         upper bound on the up scaling can be set by Rule 1—no horizontal         scrolling. This approach can be better suited for a shorter,         wider viewport.

In some implementations, the page image can be scaled to a size so that a predetermined percentage of the page image fits in the viewport 102 (e.g., the top 55% of the page). When the user clicks the controls 116, the remaining portion of the page image can be displayed in the viewport 102 (e.g., the bottom 55% of the page), rather than a new page. Alternatively, a separate control (e.g., a toggle button) can be provided for handling the scenario described above.

Using A Scaled Image

In some implementations, a scaled image is displayed by default. A zoom feature can be included that allows the user to zoom between a scaled image and the image with its original dimensions. Alternatively, software can be used to implement a multi-stage zoom. For example, a zoom dropdown menu can be presented to the user with options such as 50%, 75%, default (the scaled size), zoom to fit, or actual size. Once a size is set, the size can persist from image to image. In some implementations, images (e.g., the next book page image of the sequence) can be aggressively preloaded, pre-scaled and potentially pre-rendered at the selected size.

In some implementations, the user is presented with zoom controls upon display of a default page. The zoom controls allow users to zoom-in or zoom-out the book page images. The zoom controls can include zoom “stops” which can be customized using, for example, information about the image that was previously determined during a scanning process (e.g., image dimensions). The zoom “stops” can be zoom percentages (e.g., 10%, 38%) that have been customized to provide better user experience for the particular image being zoomed and the particular viewport size.

Margin Adjusting Process

FIG. 3 is a flow diagram for an exemplary margin adjusting process 300. Since book page images are digital images of actual book pages, the sometimes ample margins used in a conventional book are captured in the digital image. Such ample margins, however, can diminish the readability of the book in electronic form. The process 300 makes small adjustments to book page margins in the digital domain to maximize readability of book page images.

In some implementations, the process 300 begins by retrieving an image including content and margins from an image repository (302). The process 300 determines whether margins exist, and if margins exist, also determines the dimensions of the margins (304). For example, the process 300 can look for white space in the outer portion of a page image to determine if page margins exist. If page margins exist, then a difference between page dimensions and a text bounding box can be calculated to determine page margin dimensions. Once the margin dimensions are known, standard image cropping or magnifying techniques can be used to adjust (e.g., trim or increase) the margins based on the margin dimensions to provide appropriate (e.g., additional or less) space for the content (306). The image content (e.g., text) can be rescaled to fill the space provided by the margin adjusting (308). In some implementations, the book page images with adjusted margins can be stored in an image repository (e.g., image repository 504) for future retrieval when a user requests a book page having a particular scale (310).

In some implementations, cropping rules are used to provide a uniform presentation of images in the viewport. For example, each book page image in a sequence of book page images can have a designated anchor point, such as the top left-hand corner of the book page image, which can be used to anchor the text in substantially the same location of the image. When the user navigates through a book page image sequence the presentation of the content in the viewport 102 will appear uniform. In some implementations, a template can be used to scale each image in a uniform manner. The template can be a page bounding box with standard dimensions (height, width). The dimensions of the template bounding box can be determined by processing an entire image sequence and determining a typical height and width of the text in the image sequence (e.g., a median height and width). If a given text is close to the template bounding box, than the template is used. Otherwise, the text is processed, as described in reference to FIG. 2.

TOC Creation Process

FIG. 4 is a flow diagram for an exemplary TOC creation process 400. In some implementations, a TOC is presented in the viewport 102 with hypertext links to other pages in a book page sequence.

The process 400 begins by retrieving a book page sequence for an image repository (402). The book page sequence is searched using, for example, an OCR engine, to identify which images contain a TOC. Various clues, attributes or heuristics can be used to determine whether an image includes a TOC. For example, an image can be determined to be a TOC if the image contains white space, text with large fonts (e.g., a large title), ellipses, roman numerals, italicized text, or any other attributes associated with TOCs. Some or all of these clues, attributes or heuristics can be combined into a score, which can be compared to a reference to determine whether a TOC has been found.

If a TOC is found (406), then the image is tagged (408) and hypertext links are created for one or more (e.g., each) of the TOC entries (410) and embedded in the TOC image. The TOC image, including the links, can then be presented in the viewport 102.

If the TOC is not found (406), the various clues, attributes and heuristics can be used to determine breaks in the book page sequence (412). For example, the first page of each chapter or section in a book can be identified as a break in the book page sequence. The breaks in content can then be used to create a TOC (414). For example, the first page of each chapter or section of a book can be the entries of the TOC. Chapter and/or section title names used in the book can be used for naming entry points in the created TOC, if available. Otherwise, names can be created for the TOC entry points, for example, “Section 1”, “Section 2”, . . . , “Section N”.

Once the TOC is determined, links can be created for the TOC entries, and the TOC, including the links, can be presented in the viewport 102, as described in reference to FIG. 6. In some implementations, rather than embedding links into a TOC, the first few sentences or paragraphs of each chapter or section of a book can be displayed in a panel (e.g., a side panel 612 in FIG. 6).

Viewport System Architecture

FIG. 5 is a block diagram of an exemplary viewport system architecture 500. Other architectures are possible, including architectures with more or fewer components. In some implementations, the architecture 500 includes one or more processors 502 (e.g., dual-core Intel® Xeon® Processors), an image repository 504, one or more network interfaces 506, an optional administrative computer 508 and one or more computer-readable mediums 510 (e.g., RAM, ROM, SDRAM, hard disk, optical disk, flash memory, SAN, etc.). These components can exchange communications and data over one or more communication channels 512 (e.g., Ethernet, Enterprise Service Bus, PCI, PCI-Express, etc.), which can include various known network devices (e.g., routers, hubs, gateways, buses) and utilize software (e.g., middleware) for facilitating the transfer of data and control signals between devices.

The term “computer-readable medium” refers to any medium that participates in providing instructions to a processor 502 for execution, including without limitation, non-volatile media (e.g., optical or magnetic disks), volatile media (e.g., memory) and transmission media. Transmission media includes, without limitation, coaxial cables, copper wire and fiber optics. Transmission media can also take the form of acoustic, light or radio frequency waves.

The computer-readable medium 510 further includes an operating system 514 (e.g., Mac OS® server, Windows® NT server), a network communication module 516 and viewport system 518. The operating system 514 can be multi-user, multiprocessing, multitasking, multithreading, real time, etc. The operating system 514 performs basic tasks, including but not limited to: recognizing input from and providing output to the administrator computer 508; keeping track and managing files and directories on computer-readable mediums 510 (e.g., memory or a storage device); controlling peripheral devices (e.g., repositories 504); and managing traffic on the one or more communication channels 512. The network communications module 516 includes various components for establishing and maintaining network connections (e.g., software for implementing communication protocols, such as TCP/IP, HTTP, etc.).

The viewport system 518 includes a web server 520, a scaling process 522, a margin adjusting process 524, a TOC creation process 526, a reference page creation process 528 and an OCR engine 530. These components are described in reference to FIGS. 1-4.

The architecture 500 is one example of a suitable architecture for hosting a viewport system. Other architectures are possible, which can include more or fewer components. For example, the image repository 504 and computer-readable medium 510 can be the same storage device or separate storage devices. The components of architecture 500 can be located in the same facility or distributed among several facilities. The architecture 500 can be implemented in a parallel processing or peer-to-peer infrastructure or on a single device with one or more processors. The viewport system 518 can include multiple software components or it can be a single body of code. Some or all of the functionality of the viewport system 518 can be provided as a service to clients over a network. In such a case, these entities may need to install client applications. Some or all of the functionality of the viewport system 518 can be provided as part of a search engine application.

Exemplary TOC with Hypertext Links

FIG. 6 is a screen shot illustrating an exemplary TOC 604 including links 610. In some implementations, the TOC 604 can be displayed on a book search engine web page 602 displayed in a web browser window 600. Controls 608 can be provided for navigating the pages of the book. In the example shown, the controls 608 include buttons for flipping pages and a search box for jumping the user directly to a desired page. Also, included on the web page 602 is a panel 612 (e.g., the side panel shown) including information and links related to the book, as described in reference to FIG. 1. The TOC 604, including the links 610, can be generated using the process 400 described in reference to FIG. 4.

In the example shown, the user search for the book “Huckleberry Finn” using the book search engine. After clicking on a link associated with Huckleberry Finn, a default book page image is displayed (e.g., a title page). Referring to FIG. 1, if a user clicks on the table of contents link, then an image of the TOC 604 will be displayed, including links 610. If the user clicks or otherwise interacts with a links 610, a book page image in a sequence of book page images responsive to the link will be displayed.

Exemplary Book Reference Page

FIG. 7 is a screen shot illustrating an exemplary book reference page 700. In some implementations, the reference page 700 includes a summary section 701, a contents section 702, a review section 704, a pages with images section 706 and a key words section 708. The book reference page 700 is one example of a book reference page. Other configurations and formats for a book reference page are possible.

The summary section 701 includes a thumbnail image of the book's cover and basic information, such as, for example, title, author, publisher, number of pages, ISBN number, language, physical dimensions, format (i.e., paperback, hardback, e-book), etc.

The contents section 702 includes links to various chapters or sections of the book, and can list keywords that can be found in those chapters or sections. When the user clicks a link, a viewport is presented which allows the user to navigate pages of the chapter or section of the book corresponding to the link using navigation controls (e.g., controls 116).

The review section 704 includes links to book reviews and other information about the book, including reviewer ratings.

The pages with images section 706 displays thumbnails of pages of the book that includes images. If the user clicks on the image, the page with the image corresponding to the clicked thumbnail will be displayed in a viewport. If the viewport is not already presented, the viewport will be invoked in response to the click on the thumbnail image.

The key words section 708 includes categories of keywords contained in the book. The keywords can be links that when clicked cause the book page or pages containing the keyword to be displayed a viewport. If the viewport is not already presented, the viewport will be invoked in response to the click on the keyword link.

The various information contained on the book reference page 700 can be gathered from the book, the World Wide Web and any other online resources.

Various modifications may be made to the disclosed implementations and still be within the scope of the following claims. 

What is claimed is:
 1. A computer-implemented method comprising: accessing an electronic book that includes a sequence of book page images, wherein each book page image is a digital image of an actual book page and includes text; accessing a template that is generated by processing at least one book page image of the sequence of book page images, the processing at least one book page image of the sequence of book page images including determining a median height or a median width of text in the at least one book page image to determine the dimensions of the representative text bounding box of the template, wherein the template indicates dimensions of a representative text bounding box for the sequence of book page images of the electronic book; determining, for each of one or more book page images of the sequence of book page images, whether the book page image has text that substantially fills the representative text bounding box, the determining whether the book page image has text that substantially fills the representative text bounding box including determining whether dimensions of the text are within prescribed thresholds of the median height or the median width; for each of one or more of the book page images of the sequence of book page images that has text that substantially fills the representative text bounding box, scaling the book page image based at least on (i) dimensions of a user interface through which the book page image is displayed, and (ii) the dimensions of the representative text bounding box; for each of one or more of the book page images of the sequence of book page images that has text that does not substantially fill the representative text bounding box, scaling the book page image based at least on (i) a minimum text height, or (ii) a maximum text width; and providing one or more of the scaled book page images for display through the user interface.
 2. The computer-implemented method of claim 1, further comprising determining an anchor point for positioning text within each book page image of the sequence of book page images in substantially the same location in each book page image.
 3. The computer-implemented method of claim 1, further comprising changing the dimensions of the representative text bounding box based at least in part on changed dimensions of the user interface.
 4. A non-transitory computer-readable storage device having instructions stored thereon, which, when executed by at least one processor, causes the at least one processor to perform operations comprising: accessing an electronic book that includes a sequence of book page images, the processing at least one book page image of the sequence of book page images including determining a median height or a median width of text in the at least one book page image to determine the dimensions of the representative text bounding box of the template, wherein each book page image is a digital image of an actual book page and includes text; accessing a template that is generated by processing at least one book page image of the sequence of book page images, wherein the template indicates dimensions of a representative text bounding box for the sequence of book page images of the electronic book; determining, by the at least one processor, for each of one or more book page images of the sequence of book page images, whether the book page image has text that substantially fills the representative text bounding box, the determining whether the book page image has text that substantially fills the representative text bounding box including determining whether dimensions of the text are within prescribed thresholds of the median height or the median width; for each of one or more of the book page images of the sequence of book page images that has text that substantially fills the representative text bounding box, scaling the book page image based at least on (i) dimensions of a user interface through which the book page image is displayed, and (ii) the dimensions of the representative text bounding box; for each of one or more of the book page images of the sequence of book page images that has text that does not substantially fill the representative text bounding box, scaling the book page image based at least on (i) a minimum text height, or (ii) a maximum text width; and providing one or more of the scaled book page images for display through the user interface.
 5. The computer-readable storage device of claim 4, further comprising determining an anchor point for positioning text within each book page image of the sequence of book page images in substantially the same location in each book page image.
 6. The computer-readable storage device of claim 4, further comprising changing the dimensions of the representative text bounding box based at least in part on changed dimensions of the user interface.
 7. A system comprising: at least one processor; and a computer-readable storage device operatively coupled to the at least one processor and including instructions, which, when executed by the at least one processor, causes the at least one processor to perform operations comprising: accessing an electronic book that includes a sequence of book page images, wherein each book page image is a digital image of an actual book page and includes text; accessing a template that is generated by processing at least one book page image of the sequence of book page images, the processing at least one book page image of the sequence of book page images including determining a median height or a median width of text in the at least one book page image to determine the dimensions of the representative text bounding box of the template, wherein the template indicates dimensions of a representative text bounding box for the sequence of book page images of the electronic book; determining, for each of one or more book page images of the sequence of book page images, whether the book page image has text that substantially fills the representative text bounding box, the determining whether the book page image has text that substantially fills the representative text bounding box including determining whether dimensions of the text are within prescribed thresholds of the median height or the median width; for each of one or more of the book page images of the sequence of book page images that has text that substantially fills the representative text bounding box, scaling the book page image based at least on (i) dimensions of a user interface through which the book page image is displayed, and (ii) the dimensions of the representative text bounding box; for each of one or more of the book page images of the sequence of book page images that has text that does not substantially fill the representative text bounding box, scaling the book page image based at least on (i) a minimum text height, or (ii) a maximum text width; and providing one or more of the scaled book page images for display through the user interface.
 8. The system of claim 7, further comprising determining an anchor point for positioning text within each book page image of the sequence of book page images in substantially the same location in each book page image.
 9. The system of claim 7, further comprising changing the dimensions of the representative text bounding box based at least in part on changed dimensions of the user interface. 